#pragma once

class VNode
{
public:
	VNode(int x, int y, double g, double h, VNode* parent);
	~VNode();

	inline double getG() { return this->g; }
	inline double getH() { return this->h; }
	inline double getF() { return this->f; }
	inline void setG(double g) { this->g = g; this->f = this->g + this->h; }
	inline void setH(double h) { this->h = h; this->f = this->g + this->h; }
	inline void setF(double f) { this->f = f; }
	inline int getX() { return this->x; }
	inline int getY() { return this->y; }
	inline void setX(int x) { this->x = x; }
	inline void setY(int y) { this->y = y; }

	inline VNode* getParent() { return this->parent; }
	inline void setParent(VNode* node) { this->parent = node; }

	bool equal(int*);
	bool equal(int, int);

	int compare(VNode* other);
	friend bool operator < (VNode& n1, VNode& n2);
	friend bool operator > (VNode& n1, VNode& n2);

private:
	int x, y;
	double g, h, f;
	VNode* parent;
};

